﻿namespace Vdc.Grid
{
    using System;
    using System.ComponentModel;

    public class FilterOptionTemplateSettings : GridPersistentObject, ICloneable
    {
        public object Clone()
        {
            return new FilterOptionTemplateSettings { FilterControlsIds = this.FilterControlsIds, FilterControlsPropertyNames = this.FilterControlsPropertyNames, FilterTemplateId = this.FilterTemplateId };
        }

        object ICloneable.Clone()
        {
            return this.Clone();
        }

        [Category("Filter Option Template Settings"), Description("The ids of the controls from the filter template which will be used to filter the column."), Bindable(true), DefaultValue("")]
        public string FilterControlsIds
        {
            get
            {
                object obj2 = this.ViewState["FilterControlsIds"];
                if (obj2 != null)
                {
                    return obj2.ToString();
                }
                return "";
            }
            set
            {
                this.ViewState["FilterControlsIds"] = value;
            }
        }

        [Description("The property names of the controls from the filter template which will be used to filter the column."), Category("Column Template Settings"), DefaultValue("value"), Bindable(true)]
        public string FilterControlsPropertyNames
        {
            get
            {
                object obj2 = this.ViewState["FilterControlsPropertyNames"];
                if (obj2 != null)
                {
                    return obj2.ToString();
                }
                return "value";
            }
            set
            {
                this.ViewState["FilterControlsPropertyNames"] = value;
            }
        }

        [Category("Filter Option Template Settings"), Bindable(true), DefaultValue(""), Description("Template that will be used for the filter when the current option is selected.")]
        public string FilterTemplateId
        {
            get
            {
                object obj2 = this.ViewState["FilterTemplateId"];
                if (obj2 != null)
                {
                    return obj2.ToString();
                }
                return "";
            }
            set
            {
                this.ViewState["FilterTemplateId"] = value;
            }
        }
    }
}

